<!DOCTYPE html>
<html>
<head lang="en">
    <meta name="viewport" content=" initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link href="{$Think.config.RESOURCEURL}wx_assets/css/common.css{$Think.config.RESOURCE_VER}" rel="stylesheet">
    <!-- <link rel="stylesheet" href="{$Think.config.RESOURCEURL}wx_assets/css/demo.css{$Think.config.RESOURCE_VER}"> -->
    <link rel="stylesheet" href="{$Think.config.RESOURCEURL}wx_assets/css/iconfont2/iconfont.css{$Think.config.RESOURCE_VER}">
    <script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/zepto.1.1.3.min.js{$Think.config.RESOURCE_VER}"></script>
    <script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/zepto.alert.js{$Think.config.RESOURCE_VER}"></script>
    <script src="{$Think.config.RESOURCEURL}wx_assets/js/util.js{$Think.config.RESOURCE_VER}" type="text/javascript"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script type="text/javascript" src="{$Think.config.RESOURCEURL}wx_assets/js/wx_share.js{$Think.config.RESOURCE_VER}"></script>
    <title>员工终端</title>
    <style>
        body{
            background-color:#FAFAFA;
            font-size:14px;
        }
        .container{
            padding: 25px;
        }
        h1{
            color:#FF9900;
            font-size:24px;
            text-align: center;
        }
        .container>div{
            margin:37px 0 10px;
        }
        .container>div>.input{
            width:100%;
            line-height:50px;
            box-sizing:border-box;
            /* padding: 0 20px; */
            background: transparent;
            border-bottom: 1px solid #cccccc;
            display: flex;
            align-items: center;
        }
        .container>div>.input>input{
            width:100%;
            line-height:50px;
            box-sizing:border-box;
            padding: 0 10px;
            background: transparent;
        }
        a{
            height:45px;
            line-height:45px;
            border-radius:22.5px;
            background-color:{$themeColor};
            color:white;
            font-size:18px;
            text-align: center;
            display:block;
            margin-top: 30px;
        }

        p{
            margin-top:27px;
            color:#8F8C8C;
            text-align: center;
        }
        .header {
            width: 100vw;
        }
        header{
            width: 100vw;
            height: 60vw;
            overflow: hidden;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: {$themeColor};
        }
        i.iconfont{
            color: #b7b7b7;
        }
    </style>
</head>
<body>
    <if condition="$themeImg neq ''">
        <img src="{$themeImg}" class="header">
        <else />
        <header></header>
    </if>
    <div class="container">
        <div>
            <div class="input">
                <i class="icon iconfont icon-iconzhenghe31"></i><input type="text" id="email" placeholder="请输入您的用户名">
            </div>
            <div class="input">
                <i class="icon iconfont icon-mima"></i><input type="password" id="password" placeholder="请输入您的密码">
            </div>

        </div>
        <a id="register">登录</a>
    </div>
<script>
    var baseUrl = '{$Think.config.SERVER_HOST}';
    $("#register").click(function() {
        var p=$.util.getParamAsObject();
        if($(this).hasClass("disabled")){
            return;
        }
        var email = $("#email").val();
        var password = $("#password").val();
        if (!email || !password) {
            $.util.alert("信息不完整!");
            return;
        }
        var params = {
            "email":email,
            "password":password
        };
        $.util.pageLoading.show();
        $.req.get("call.json?customerId={$customerId}&module=employeeManage&method=binding", {
            params: params
        }, function (data) {
            if(!data.hasOwnProperty('code')){
                if(!p){p={};}
                p.id=data.storeId;
                p=encodeURIComponent(JSON.stringify(p));
                location.href = '{$Think.config.SERVER_HOST}call.html?customerId={$customerId}&module=employeeManage&method=index&params='+p;
            }else{
                $.util.alert(data.msg);
            }
            $.util.pageLoading.hide();
        });
    });
</script>
<script>
    wx_share.init({
        "pkg":{
            "appId": '{$pkg.appId}',
            "timestamp": '{$pkg.timestamp}',
            "nonceStr": '{$pkg.nonceStr}',
            "signature": '{$pkg.signature}'
        },
        hide:1
    });
</script>
</body>
</html>